package  
{
	/**
	 * ...
	 * @author Martina Rasch
	 */
	
	import net.flashpunk.Entity;
	import net.flashpunk.FP;
	import net.flashpunk.graphics.Spritemap;
	
	public class PlayerBar extends Entity
	{
		[Embed(source = 'res/playerBar.png')] private const PLAYER:Class;
		
		private var player:Spritemap = new Spritemap(PLAYER, 400, 50);
		private var record:Boolean;
		
		public function PlayerBar(xOff:int, yOff:int, rec:Boolean = false) 
		{
			record = rec;
			x = xOff;
			y = yOff;
			player.add("show", [0], 20, true); 
			player.add("new", [1], 20, true); 
			
			graphic = player;
		}
		
		override public function update():void {
			super.update();
			if (record) {
				player.play("new");
			} else {
				player.play("show");
			}
		}
		
	}

}